
package com.hlkj.pay.app.transfer;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.hlkj.pay.infrastructure.model.order.PayOrderDO;
import com.hlkj.pay.infrastructure.model.order.RefundOrderDO;
import com.hlkj.pay.vo.order.resp.PayOrderResp;
import com.hlkj.pay.vo.openapi.order.resp.PayOrderSubmitApiResp;
import com.hlkj.pay.vo.order.resp.RefundOrderResp;

/**
 * @author HlpayTeam
 * @date 2024/10/12 9:34
 */
@Mapper
public interface PayOrderDoToResp {

    PayOrderDoToResp INSTANCE = Mappers.getMapper(PayOrderDoToResp.class);

    /**
     * 
     * @param payOrderDO
     * @return
     */
    PayOrderResp payOrderResp(PayOrderDO payOrderDO);
    /**
     *
     * @param payOrderDO
     * @return
     */
    PayOrderSubmitApiResp payOrderSubmitResp(PayOrderDO payOrderDO);

    /**
     * z
     * @param refundOrderDO
     * @return
     */
    @Mapping(source = "refundStatus", target = "status")
    @Mapping(source = "bankMsg", target = "message")
    @Mapping(source = "refundReason", target = "reason")
    RefundOrderResp refundOrderResp(RefundOrderDO refundOrderDO);
}
